export const tableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  // searchMenuSpan: 6,
  columnBtn: false,
  searchLabelWidth: 100,
  emptyBtnText: "重置",
  searchBtnText: "查询",
  menuWidth: 160,
  dialogEscape: false,
  dialogClickModal: false,
  selection: true,
  menuPosition: "left",
  column: [
    {
      type: "input",
      label: "",
      hide: true,
      prop: "id"
    },
    {
      type: "input",
      label: "公司名称",
      search: true,
      prop: "companyName"
    },
    {
      type: "select",
      label: "房产类型",
      slot: true,
      search: true,
      searchslot: true,
      prop: "buildingType"
    },
    {
      type: "input",
      search: true,
      label: "关联房产编号",
      prop: "ctContractProject"
    },
    {
      searchslot: false,
      search: true,
      type: "month",
      format: "yyyy-MM",
      valueFormat: "yyyy-MM",
      label: "应缴月份",
      prop: "payCost",
      formatter: function(row, value, label, column) {
        if (value) {
          return value
            .substring(0, 8)
            .replace("-", "年")
            .replace("-", "月");
        } else {
          return "";
        }
      }
    },
    {
      search: false,
      searchslot: false,
      hide: true,
      label: "欠费月数",
      prop: "month"
    },
    {
      type: "input",
      label: "联系人",
      prop: "name"
    },
    {
      type: "input",
      label: "联系方式",
      prop: "phone"
    },
    {
      type: "input",
      label: "关联合同编号",
      prop: "contractNumber"
    },
    {
      type: "input",
      label: "应缴费用(元)",
      prop: "totalAmount"
    },
    {
      type: "input",
      label: "合同总额(元)",
      prop: "sumMoney"
    }
  ]
};

export const tableOptions = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  searchMenuSpan: 6,
  editBtn: false,
  delBtn: false,
  addBtn: false,
  columnBtn: false,
  searchLabelWidth: 100,
  emptyBtnText: "重置",
  dialogEscape: false,
  dialogClickModal: false,
  searchBtnText: "查询",
  menuWidth: 100,
  selection: true,
  reserveSelection: true,
  column: [
    {
      type: "input",
      label: "",
      hide: true,
      prop: "id"
    },
    {
      type: "input",
      label: "公司名称",
      search: false,
      prop: "companyName"
    },
    {
      type: "select",
      label: "房产编号",
      slot: false,
      search: false,
      searchslot: true,
      prop: "ctContractProject"
    },
    {
      search: false,
      searchslot: false,
      label: "应缴月份",
      prop: "payCost",
      formatter: function(row, value, label, column) {
        if (value) {
          return value
            .substring(0, 8)
            .replace("-", "年")
            .replace("-", "月");
        } else {
          return "";
        }
      }
    },
    {
      type: "input",
      label: "应缴金额(元)",
      prop: "totalAmount"
    },
    {
      type: "input",
      label: "缴纳状态",
      prop: "isPayment",
      dicData: [
        {
          label: "否",
          value: 0
        },
        {
          label: "是",
          value: 1
        }
      ]
      // dicUrl: '/admin/dict/type/payment_status',
      // formatter: function(row, value, label, column) {
      //   return value;
      // }
    },
    {
      type: "input",
      label: "缴费日期",
      prop: "paymentTime"
    },
    {
      type: "input",
      label: "是否开票",
      prop: "isInvoice",
      dicData: [
        {
          label: "是",
          value: "0"
        },
        {
          label: "否",
          value: "1"
        }
      ],
      formatter: function(row, value, label, column) {
        if (value || value == 0) {
          return value + "";
        } else {
          return "1";
        }
      }
    },
    {
      type: "input",
      label: "操作人",
      prop: "updateByName"
    }
  ]
};
